// Kecheng.java
public class Kecheng {
    private String kechengMingcheng; // 课程名称
    private int kechengXuefen;     // 课程学分

    public Kecheng(String kechengMingcheng, int kechengXuefen) {
        this.kechengMingcheng = kechengMingcheng;
        this.kechengXuefen = kechengXuefen;
    }

    public String getKechengMingcheng() {
        return kechengMingcheng;
    }

    public void setKechengMingcheng(String kechengMingcheng) {
        this.kechengMingcheng = kechengMingcheng;
    }

    public int getKechengXuefen() {
        return kechengXuefen;
    }

    public void setKechengXuefen(int kechengXuefen) {
        this.kechengXuefen = kechengXuefen;
    }

    @Override
    public String toString() {
        return "课程名称: " + kechengMingcheng + ", 学分: " + kechengXuefen;
    }
}
